import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-11-03
 * Time: 10:58
 */
public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1 = in.nextLine();
        String str2 = in.nextLine();
        StringBuffer strN = new StringBuffer(str1);
        int len2 = str2.length();
        for(int i = 0; i < len2; i++) {
            char ch2 = str2.charAt(i);
            int len1 = str1.length();
            int j = 0;
            while(j < strN.length()) {
                char ch1 = strN.charAt(j);
                if(ch1 == ch2) {
                    strN.delete(j, j + 1);
                    continue;
                }
                j++;
            }
        }
        System.out.println(strN.toString());
    }
}
